/*
 * uart.h
 *
 * Created: 12/17/2012 12:17:26 PM
 *  Author: duerk@msoe.edu <Kevin Duer>
 *			zimmermane@msoe.edu <Evan Zimmerman>
 *			woottons@msoe.edu <Scott Wootton>
 *	
 * 
 * Purpose: This is the header file for the uart
*/
#ifndef uart_h
#define uart_h

#include<stdint.h>
#define BUFFER_SIZE 40 // maximum input buffer size

/* uart_init
 * 
 * Purpose: Setups up the uart for sending and receiving
 *          data.  The value for the URBRR is passed in
 *          and is assumed to only fit in the URBRRL.
 * Params: uint8_t urbb_val - sets the URBB value
 * Returns: none
 */
void uart_init(uint8_t urbb_val);

/* uart_putc
 * 
 * Purpose: Puts the character into the UDR.  This will
 *          handle newlines and return characters
 *          as well.
 * Params: char c - character to be written to the UDR
 * Returns: none
 */
void uart_putc(char c);

/* uart_getc
 * 
 * Purpose: Gets the character for the UDR.  It will
 *          display the character back to the user.
 *          If the buffer is full it will send a beep.
 *          Return will reset the buffer and backspace
 *          will overwrite the previous character.
 * Params: none
 * Returns: char c - the character that was read
 */
char uart_getc(void);

#endif